package cn.tedu;

import javax.swing.*;

/**
 * 图片类
 */
public class Image {
    public static ImageIcon battleship;//战舰图
    public static ImageIcon bomb;//深水炸弹图
    public static ImageIcon gameover;//游戏结束图
    public static ImageIcon mine;//水雷图
    public static ImageIcon minesubm;//水雷潜艇图
    public static ImageIcon obsersubm;//侦察潜艇图
    public static ImageIcon sea;//海洋图
    public static ImageIcon torpesubm;//鱼雷潜艇图

    static {
        //初始化静态图片
        battleship = new ImageIcon("tedu-javase01/img/battleship.png");
        bomb = new ImageIcon("tedu-javase01/img/bomb.png");
        gameover = new ImageIcon("tedu-javase01/img/gameover.png");
        mine = new ImageIcon("tedu-javase01/img/mine.png");
        minesubm =new ImageIcon("tedu-javase01/img/minesubm.png");
        obsersubm = new ImageIcon("tedu-javase01/img/obsersubm.png");
        sea = new ImageIcon("tedu-javase01/img/sea.png");
        torpesubm = new ImageIcon("tedu-javase01/img/torpesubm.png");
    }

    /**
     *测试图片是否调用成功
     */
    public static void main(String[] args) {
        System.out.println(battleship.getImageLoadStatus());
        System.out.println(bomb.getImageLoadStatus());
        System.out.println(gameover.getImageLoadStatus());
        System.out.println(mine.getImageLoadStatus());
        System.out.println(minesubm.getImageLoadStatus());
        System.out.println(obsersubm.getImageLoadStatus());
        System.out.println(sea.getImageLoadStatus());
        System.out.println(torpesubm.getImageLoadStatus());
    }



}
